package com.example.user.biz.mapper;

import com.example.user.biz.domain.po.User;
import com.example.user.domain.vo.UserInfoVO;
import com.example.user.domain.vo.VolunteerVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {
    /**
     * 根据Id获取用户信息
     * @param userId
     * @return
     */
    @Select("select id,phone,gender,nickname,avatar,birthday,region,status,role,total_points from users")
    UserInfoVO selectUserInfo(Long userId);

    void updateUserInfo(User user);

    /**
     * 志愿活动所需的用户信息
     * @param userId
     * @return
     */
    @Select("select phone,nickname,avatar from users")
    VolunteerVO getVolunteerList(Long userId);

    @Select("select from users")
    User selectById(Long userId);
}
